<template>
    <div class="survey-item-header">
        <p>{{title}}</p>
        <div class="operate-btn" @click="jumpRoute">
            <span>{{btnTitle}}</span>
            <i v-if="icon" class="el-icon-arrow-right"></i>
        </div>
    </div>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      default: ''
    },
    btnTitle: {
      type: String,
      default: '详情'
    },
    icon: {
      type: Boolean,
      default: false
    },
    path: {
      type: String,
      default: ''
    },
    isJump: {
      type: Boolean,
      default: true
    }
  },
  methods: {
    jumpRoute () {
      if (this.isJump && this.path) {
        this.$router.push(this.path)
      }
    }
  }
}
</script>

<style lang="scss" scoped>
    .survey-item-header{
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 25px;
        p{
            color: #333333;
            font-size: 18px;
            font-weight: bold;
        }
        .operate-btn{
            color: #3388FF;
            font-size: 14px;
            cursor: pointer;
        }
    }
</style>
